package com.sikaryofficial.workbench.domain.mapping;

import com.sikaryofficial.workbench.domain.dto.req.membership.MembershipRelationReq;
import com.sikaryofficial.workbench.domain.dto.resp.membership.MembershipRelationDTO;
import com.sikaryofficial.workbench.domain.entity.MembershipRelation;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author : wuweihong
 * @desc : 用户会员关系实体映射
 * @date : 2024-10-24
 */

@Mapper
public interface MembershipRelationMapping {

	MembershipRelationMapping INSTANCE = Mappers.getMapper(MembershipRelationMapping.class);

	/**
	 * 实体映射req
	 * @param req
	 * @return
	 */
	MembershipRelation coverToReq(MembershipRelationReq req);

	/**
	 * 实体列表映射req
	 * @param reqs
	 * @return
	 */
	List<MembershipRelation> coverToListReq(List<MembershipRelationReq> reqs);

	/**
	 * 实体映射resp
	 * @param membershipRelation
	 * @return
	 */
	MembershipRelationDTO coverToResp(MembershipRelation membershipRelation);

	/**
	 * 实体列表映射resp
	 * @param membershipRelations
	 * @return
	 */
	List<MembershipRelationDTO> coverToListResp(List<MembershipRelation> membershipRelations);

}
